/**
 *
 * @Describe  数据服务层
 * @Time  2019-08-20
 * @Author  zpw
 *
 */
import req from '../config/axios'


/***
 *
 * @Des 首页  AS  index
 * @author  zpw
 *
 * */

//请求商品列表
export const getGoodsList = async (data) => await req.get("/product_list",data);



/***
 *
 * @Des 商品详情  AS  goodsDetails
 * @author  zpw
 *
 * */

//请求商品详情
export const getGoodsDetail = async (data) => await req.get("/product_detial",data);

/***
 *
 * @Des 创建订单  AS  createOrder
 * @author  zpw
 *
 * */

//创建订单
export const createOrder = async (data) => await req.post("/exchange_order",data);

/***
 *
 * @Des 订单列表  AS  orderList
 * @author  zpw
 *
 * */

//订单列表
export const getOrderList = async (data) => await req.get("/exchange_order",data);

/***
 *
 * @Des 确认订单  AS  confirmOrder
 * @author  zpw
 *
 * */

//请求提货地点列表
export const getAddressList = async (data) => await req.get("/self_help_point",data);


/***
 *
 * @Des 订单详情  AS  orderDetail
 * @author  zpw
 *
 * */

//订单详情
export const getOrderDetail = async (data) => await req.get("/exchange_order/detial",data);

/***
 *
 * @Des 关闭订单  AS  orderClose
 * @author  zpw
 *
 * */

//关闭订单
export const closeOrder = async (data) => await req.post("/close_order",data);



/***
 *
 * @Des 授权  AS  auth
 * @author  zpw
 *
 * */

//认证用户
export const loginAccess = async (data) => await req.post("/auth_code",data);


/***
 *
 * @Des 支付  AS  pay
 * @author  zpw
 *
 * */

//支付
export const userPayment = async (data) => await req.post("/exchange_order/pay",data);


/***
 *
 * @Des 登录  AS  login
 * @author  zpw
 *
 * */

//h5网页登录
export const webLoginAccess = async (data) => await req.post("/login",data);
//获取验证码
export const webGetCode = async (data) => await req.post("/mobile/code",data);


/***
 *
 * @Des undefied  AS  undefied
 * @author  zpw
 *
 * */

//支付宝回传参数 => 再调用自己的服务器接口
export const aliParamBack = async (data) => await req.post("/exchange/send",data);



 











